﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace CameraSystem
{
    [ExecuteInEditMode]//在编辑器模式下也运行
    [RequireComponent(typeof(Camera))]//必须有Camera组件
    public abstract class CameraEffectBase: MonoBehaviour,ICameraEffect
    {
        protected Shader EffectShader;
        protected Material EffectMaterial;

        public abstract void OnRender(RenderTexture src, RenderTexture dest);

        public abstract void SetArgs(params object[] args);

        void OnRenderImage(RenderTexture src, RenderTexture dest)
        {
            OnRender(src, dest);
        }

      
    }
}
